//发送企业分布消息
export function sendDistributionMsg(value) {
    // let descriptor = {
    //     distribution: value
    // }
    // window.emitUIInteraction(descriptor);
    return false
}

export function sendToUeMsg(msg) {
    window.emitUIInteraction(msg);
    return false
}


// 测绘工具 Measure
export function sendCLoseMeasureMsg() {
    let lengthMeasureObj = {
        lengthMeasure: 0
    }
    window.emitUIInteraction(lengthMeasureObj);

    let areaMeasureObj = {
        areaMeasure: 0
    }
    window.emitUIInteraction(areaMeasureObj);

    let earthLengthObj = {
        earthLength: 0
    }
    window.emitUIInteraction(earthLengthObj);

    let earthAreaObj = {
        earthArea: 0
    }
    window.emitUIInteraction(earthAreaObj);

    return false
}

//发送传感器消息
export function sendSensorMsg(value) {
    let descriptor = {
        sensor: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送监控消息
export function sendMonitorMsg(value) {
    let descriptor = {
        monitor: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送系统模型消息
export function sendSceneEditingMsg(value) {
    let descriptor = {
        sceneEditing: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送漫游消息
export function sendRomaMsg(value) {
    let descriptor = {
        sequence: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送空间标会消息
export function sendPlottingMsg(value) {
    let descriptor = {
        plotting: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送初始化消息
export function sendInitGameMsg(value) {
    let descriptor = {
        initGame: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送初始化消息
export function sendEditModeMsg(value) {
    let descriptor = {
        editMode: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送截图消息
export function sendscreenshotMsg(value) {
    let descriptor = {
        screenshot: value
    }
    window.emitUIInteraction(descriptor);
    return false
}


//初始化设备点位
export function sendEquipmentInitMsg(value) {
    // let descriptor = {
    //     initEquipment: value
    // }
    window.emitUIInteraction(value);
    return false
}
//隐藏设备点位
export function sendEquipment0Msg(value) {
    let descriptor = {
        equipment0: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//显示设备点位
export function sendEquipment1Msg(value) {
    let descriptor = {
        equipment1: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//显示日照效果
export function sendSunShineValueMsg(value) {
    let descriptor = {
        sunshine: value
    }
    window.emitUIInteraction(descriptor);
    return false
}

//发送点位消息
export function sendLocationMsg(value, query) {
    let descriptor = {
        query: query, // 0 隐藏 1开启
        longlat: value.longitude + ',' + value.latitude,
        id: value.id
    }
    window.emitUIInteraction(descriptor);
    return false
}

//导入模型
export function sendImportModelMsg() {
    let descriptor = {
        importModel: 1,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//绘制区域
export function sendAreaDeviceMsg(value) {
    let descriptor = {
        searchAreaDevice: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//清空UE漫游路线
export function sendRoamClearMsg(value) {

    let descriptor = {
        roamClear: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//漫游配置
export function sendRoamSpeedMsg(value) {

    let descriptor = {
        roamSpeed: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//漫游配置
export function sendRoamHeightMsg(value) {

    let descriptor = {
        roamHeight: value,
    }
    window.emitUIInteraction(descriptor);
}

//漫游角度配置
export function sendRoamPitchMsg(value) {

    let descriptor = {
        roamPitch: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//开始录制漫游
export function recordRoamMsg(value) {
    let descriptor = {
        roam: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//开始播放录制漫游
export function playRomaMsg(value) {
    let descriptor = {
        playBack: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//开始播放当前漫游
export function playCurrenRomaMsg(value) {
    let descriptor = {
        roamStart: value,
    }
    window.emitUIInteraction(descriptor);
    return false
}

//开始结束标记
export function sendStartPointMsg(value) {
    let descriptor = {
        ptStart: value,//
    }
    window.emitUIInteraction(descriptor);
    return false
}

//清除标记
export function sendClearPointMsg() {
    let descriptor = {
        ptClear: 1,//
    }
    window.emitUIInteraction(descriptor);
    return false
}

//标地点位信息
export function sendPointInfoMsg(value) {
    // console.log("消息",value.color)
    var color = value.color.substring(4, value.color.length - 1)

    // console.log("消息",color)
    let descriptor = {
        ptType: value.symbol,//种类
        ptColor: color,//颜色
        ptText: value.areaName,//自定义文字
    }
    window.emitUIInteraction(descriptor);
    return false
}

//系统模型
export function sendQueryModelMsg(value) {
    let descriptor = {
        queryModel: value,//id
    }
    window.emitUIInteraction(descriptor);
    return false
}

//关闭系统模型
export function sendQueryModelEndMsg(value) {
    let descriptor = {
        queryEnd: value,//id
    }
    window.emitUIInteraction(descriptor);
    return false
}

//开启关闭热力图
// export function sendHeatMapMsg(value) {
//     let descriptor = {
//         heatMap: value,//id
//     }
//     window.emitUIInteraction(descriptor);
//     return false
// }

//热力图点位
// export function sendHeatMapInfoMsg(type,value) {
//     let descriptor = {}

//     if (type == 0) {
//         descriptor = {
//             heatMap: type,
//         }
//     }
//     if (type == 1) {
//         descriptor = {
//             heatMap: type,
//             hmLang: value.longitude,
//             hmLat: value.latitude,
//             hmIntensity: value.level,
//         }
//     }
//     window.emitUIInteraction(descriptor);
//     return false
// }





